package com.lesson01;

public class TestJoin implements Runnable{

    public static void main(String[] args) throws InterruptedException {
        TestJoin t1 = new TestJoin();
        Thread thread = new Thread(t1);
        thread.start();
        for (int i = 0; i < 1000; i++) {
            if(i==200)
                thread.join();//插队
            System.out.println("main"+i);
        }
    }

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("VIP来了"+i);
        }
    }
}
